package com.senlingspace.system.service.impl;

import java.util.List;
import com.senlingspace.common.utils.DateUtils;
import com.senlingspace.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.senlingspace.system.mapper.SlkjEquipmentInfoMapper;
import com.senlingspace.system.domain.SlkjEquipmentInfo;
import com.senlingspace.system.service.ISlkjEquipmentInfoService;

/**
 * 设备信息列Service业务层处理
 *
 * @author wangliang
 * @date 2024-12-06
 */
@Service
public class SlkjEquipmentInfoServiceImpl implements ISlkjEquipmentInfoService
{
    @Autowired
    private SlkjEquipmentInfoMapper slkjEquipmentInfoMapper;

    /**
     * 查询设备信息列
     *
     * @param id 设备信息列主键
     * @return 设备信息列
     */
    @Override
    public SlkjEquipmentInfo selectSlkjEquipmentInfoById(Long id)
    {
        return slkjEquipmentInfoMapper.selectSlkjEquipmentInfoById(id);
    }

    /**
     * 查询设备信息列列表
     *
     * @param slkjEquipmentInfo 设备信息列
     * @return 设备信息列
     */
    @Override
    public List<SlkjEquipmentInfo> selectSlkjEquipmentInfoList(SlkjEquipmentInfo slkjEquipmentInfo)
    {
        return slkjEquipmentInfoMapper.selectSlkjEquipmentInfoList(slkjEquipmentInfo);
    }

    /**
     * 新增设备信息列
     *
     * @param slkjEquipmentInfo 设备信息列
     * @return 结果
     */
    @Override
    public int insertSlkjEquipmentInfo(SlkjEquipmentInfo slkjEquipmentInfo)
    {
        slkjEquipmentInfo.setCreateTime(DateUtils.getNowDate());
        slkjEquipmentInfo.setCreateBy(SecurityUtils.getUsername());
        return slkjEquipmentInfoMapper.insertSlkjEquipmentInfo(slkjEquipmentInfo);
    }

    /**
     * 修改设备信息列
     *
     * @param slkjEquipmentInfo 设备信息列
     * @return 结果
     */
    @Override
    public int updateSlkjEquipmentInfo(SlkjEquipmentInfo slkjEquipmentInfo)
    {
        slkjEquipmentInfo.setUpdateTime(DateUtils.getNowDate());
        slkjEquipmentInfo.setUpdateBy(SecurityUtils.getUsername());
        return slkjEquipmentInfoMapper.updateSlkjEquipmentInfo(slkjEquipmentInfo);
    }

    /**
     * 批量删除设备信息列
     *
     * @param ids 需要删除的设备信息列主键
     * @return 结果
     */
    @Override
    public int deleteSlkjEquipmentInfoByIds(Long[] ids)
    {
        return slkjEquipmentInfoMapper.deleteSlkjEquipmentInfoByIds(ids);
    }

    /**
     * 删除设备信息列信息
     *
     * @param id 设备信息列主键
     * @return 结果
     */
    @Override
    public int deleteSlkjEquipmentInfoById(Long id)
    {
        return slkjEquipmentInfoMapper.deleteSlkjEquipmentInfoById(id);
    }
}
